home *** CD-ROM | disk | FTP | other *** search
- ;---------------------------------------------------------------------
- ; ASM88 FILE: GETRET.A Get Return Code from Child Process
- ; ----------
- ; WRITTEN: 25/10/87
- ; -------
- ; PURPOSE: This is one of a series of files which take
- ; ------- advantage of INT 21H functions under MS-DOS.
- ; In each case the error situation is marked by
- ; the carry flag being set. We use the De Smet
- ; external variable '_carryf' to see whether the
- ; carry is set on return from the function.
- ; If so, the error code can be used to obtain
- ; information about the specific error.
- ;
- ; USAGE: int GETRET()
- ; -----
- ;
- ; DEPENDENCIES: De Smet C V 2.44+
- ; ------------
- ; Copyright 1987 - Cogar Computer Services Pty. Ltd
- ;---------------------------------------------------------------------
-
- CSEG
- PUBLIC GETRET_
-
- GETRET_:
- push bp ; normal De Smet C start
- mov bp,sp ; point to the stack
- mov ax,ds ; and make ES common with DS
- mov es,ax
- ;----------------------------------------------------------------------
- ; The unique programme follows.
- ;----------------------------------------------------------------------
- mov ah,4dh ; the Function No.
- int 21h
- ;----------------------------------------------------------------------
- ; Normal programme termination.
- ;----------------------------------------------------------------------
- GETRET_QUIT:
- pop bp ; restore starting conditions
- ret
- ;----------------------------------------------------------------------